package com.taxi.driver.data.entity;

import me.yokeyword.indexablerv.IndexableEntity;

public class ResourcesEntity implements IndexableEntity {

    private String name;
    private String uuid;
    private String pinyin;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    @Override
    public String getFieldIndexBy() {
        // 多音字判断
        String indexName = name;
        if ("重庆市".equals(name)) {
            indexName = "#chongqingshi#重庆市";
        }
        if ("长春市".equals(name)) {
            indexName = "#changchunshi#长春市";
        }
        if ("长治市".equals(name)) {
            indexName = "#changzhishi#长治市";
        }
        if ("长沙市".equals(name)) {
            indexName = "#changshashi#长沙市";
        }
        if ("厦门市".equals(name)) {
            indexName = "#xiamengshi#厦门市";
        }
        return indexName;
    }

    @Override
    public void setFieldIndexBy(String indexField) {
        this.name = indexField;
    }

    @Override
    public void setFieldPinyinIndexBy(String pinyin) {
        this.pinyin = pinyin;
    }
}
